import Vue from 'vue'
import routes from './common/routes';
import App from './app';
import VueRouter from 'vue-router';
import mainMenu from './components/main-menu.vue';
import navBar from './components/nav-bar.vue';
import trtcStateCheck from './components/trtc-state-check';
import { BootstrapVue, IconsPlugin, BSidebar, BToast, ToastPlugin, ModalPlugin } from 'bootstrap-vue'
import store from './store/index'
import stylus from 'stylus/lib/cache/index'

// import VueAwesomeSwiper from 'vue-awesome-swiper'

// import style
// import 'swiper/css/swiper.css'
// If you use Swiper 6.0.0 or higher
// import 'swiper/swiper-bundle.css'


// import VueAwesomeSwiper from 'vue-awesome-swiper'
// // import style
// import 'swiper/css/swiper.css'
// // If you use Swiper 6.0.0 or higher
// import 'swiper/swiper-bundle.css'



import './assets/icon/iconfont.css'
import './assets/icon/tim.css'
import './assets/css/reset.css'
import './assets/css/animate.css'

import 'bootstrap/dist/css/bootstrap.css';
import 'bootstrap-vue/dist/bootstrap-vue.css';
import './common.css';

import '../public/font_1996580_a9fqejgqnpu/iconfont.css'
import ElementUI from 'element-ui'

import tim from './tim'
import TIM from 'tim-js-sdk'
let vueRouter = new VueRouter({
    mode: 'hash',
    base: 'index',
    routes: routes
});
// 安装 vue 插件
Vue.use(BootstrapVue);
Vue.use(IconsPlugin);
Vue.use(VueRouter);
Vue.use(ToastPlugin);
Vue.use(ModalPlugin);
Vue.prototype.$bus = new Vue() // event Bus 用于无关系组件间的通信。

// Vue.use(VueAwesomeSwiper)
// Vue.use(VueAwesomeSwiper)


Vue.use(tim)
Vue.use(TIM)
window.tim = tim
window.TIM = TIM

window.store = store
Vue.prototype.TIM = TIM
Vue.prototype.tim = tim

Vue.prototype.$store = store

Vue.use(ElementUI)
Vue.use(stylus)
    // 安装自定义组件
Vue.component('main-menu', mainMenu);
Vue.component('nav-bar', navBar);
Vue.component('trtc-state-check', trtcStateCheck);
Vue.component('b-sidebar', BSidebar);
Vue.component('b-toast', BToast);

Vue.config.productionTip = true;

// 实例化一个 Vue
let vueApp = new Vue({
    router: vueRouter,
    render: h => h(App)
});
vueApp.$mount("#trtc-electron-demo");

window.$app = vueApp;

window.addEventListener('popstate', () => {
    console.demoWarn('popstate: ', window.location.pathname);
});